<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Simple Framework: Framework.Core.MessageQueue&lt; TEventType &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Simple Framework
   &#160;<span id="projectnumber">v0.1.1</span>
   </div>
   <div id="projectbrief">A simple Unity application framework</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_framework_1_1_core_1_1_message_queue.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="class_framework_1_1_core_1_1_message_queue-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">Framework.Core.MessageQueue&lt; TEventType &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>消息管理队列，用于分发消息。  
 <a href="class_framework_1_1_core_1_1_message_queue.html#details">更多...</a></p>
<div class="dynheader">
类 Framework.Core.MessageQueue&lt; TEventType &gt; 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="class_framework_1_1_core_1_1_message_queue__inherit__graph.png" border="0" usemap="#_framework_8_core_8_message_queue_3_01_t_event_type_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="_framework_8_core_8_message_queue_3_01_t_event_type_01_4_inherit__map" id="_framework_8_core_8_message_queue_3_01_t_event_type_01_4_inherit__map">
<area shape="rect" id="node2" href="interface_framework_1_1_core_1_1_i_message_queue.html" title="消息队列的接口，由消息管理负责维护生命周期。 " alt="" coords="53,5,169,112"/>
</map>
</div>
<div class="dynheader">
Framework.Core.MessageQueue&lt; TEventType &gt; 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="class_framework_1_1_core_1_1_message_queue__coll__graph.png" border="0" usemap="#_framework_8_core_8_message_queue_3_01_t_event_type_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="_framework_8_core_8_message_queue_3_01_t_event_type_01_4_coll__map" id="_framework_8_core_8_message_queue_3_01_t_event_type_01_4_coll__map">
<area shape="rect" id="node2" href="interface_framework_1_1_core_1_1_i_message_queue.html" title="消息队列的接口，由消息管理负责维护生命周期。 " alt="" coords="53,5,169,112"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a9c56bdfdc642548fed0d9fcac7a81825"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_framework_1_1_core_1_1_message_queue.html#a9c56bdfdc642548fed0d9fcac7a81825">RegisterHandler</a> (TEventType msgId, EventHandler&lt; EventArgs &gt; callback)</td></tr>
<tr class="memdesc:a9c56bdfdc642548fed0d9fcac7a81825"><td class="mdescLeft">&#160;</td><td class="mdescRight">注册一个消息处理方法。  <a href="#a9c56bdfdc642548fed0d9fcac7a81825">更多...</a><br /></td></tr>
<tr class="separator:a9c56bdfdc642548fed0d9fcac7a81825"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60596d35a1ec6fdbf05f213b5ec57ac8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_framework_1_1_core_1_1_message_queue.html#a60596d35a1ec6fdbf05f213b5ec57ac8">RemoveHandler</a> (TEventType msgId, EventHandler&lt; EventArgs &gt; callback)</td></tr>
<tr class="memdesc:a60596d35a1ec6fdbf05f213b5ec57ac8"><td class="mdescLeft">&#160;</td><td class="mdescRight">移除指定消息处理方法。  <a href="#a60596d35a1ec6fdbf05f213b5ec57ac8">更多...</a><br /></td></tr>
<tr class="separator:a60596d35a1ec6fdbf05f213b5ec57ac8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8669487e327e8d37b8ff3aed3ab7689"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_framework_1_1_core_1_1_message_queue.html#ab8669487e327e8d37b8ff3aed3ab7689">DispatchMessage</a> (TEventType msgId, object sender, EventArgs param=null)</td></tr>
<tr class="memdesc:ab8669487e327e8d37b8ff3aed3ab7689"><td class="mdescLeft">&#160;</td><td class="mdescRight">向所有注册的处理方法分发指定消息。  <a href="#ab8669487e327e8d37b8ff3aed3ab7689">更多...</a><br /></td></tr>
<tr class="separator:ab8669487e327e8d37b8ff3aed3ab7689"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a021a5bf68a0fa77e6edcfc1a27511b49"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_framework_1_1_core_1_1_message_queue.html#a021a5bf68a0fa77e6edcfc1a27511b49">Initialize</a> (bool immediate=true)</td></tr>
<tr class="memdesc:a021a5bf68a0fa77e6edcfc1a27511b49"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化消息管理器。  <a href="#a021a5bf68a0fa77e6edcfc1a27511b49">更多...</a><br /></td></tr>
<tr class="separator:a021a5bf68a0fa77e6edcfc1a27511b49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8befe645436f030dbf2028fe43af1249"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_framework_1_1_core_1_1_message_queue.html#a8befe645436f030dbf2028fe43af1249">Update</a> ()</td></tr>
<tr class="memdesc:a8befe645436f030dbf2028fe43af1249"><td class="mdescLeft">&#160;</td><td class="mdescRight">推动消息队列。  <a href="#a8befe645436f030dbf2028fe43af1249">更多...</a><br /></td></tr>
<tr class="separator:a8befe645436f030dbf2028fe43af1249"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bcb8c1a195bbb8b375b8caa803244cc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_framework_1_1_core_1_1_message_queue.html#a2bcb8c1a195bbb8b375b8caa803244cc">Dispose</a> ()</td></tr>
<tr class="memdesc:a2bcb8c1a195bbb8b375b8caa803244cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">释放消息管理器的资源。  <a href="#a2bcb8c1a195bbb8b375b8caa803244cc">更多...</a><br /></td></tr>
<tr class="separator:a2bcb8c1a195bbb8b375b8caa803244cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>消息管理队列，用于分发消息。 </p>
<dl class="tparams"><dt>模板参数</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">TEventType</td><td>事件类型的枚举。</td></tr>
  </table>
  </dd>
</dl>
<div class="typeconstraint">
<dl><dt><b>类型限制</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em>TEventType</em></td><td>&#160;:</td><td valign="top"><em>struct</em></td><td>&#160;</td></tr>
</table>
</dd>
</dl>
</div>

<p class="definition">在文件 <a class="el" href="_message_queue_8cs_source.html">MessageQueue.cs</a> 第 <a class="el" href="_message_queue_8cs_source.html#l00011">11</a> 行定义.</p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="ab8669487e327e8d37b8ff3aed3ab7689"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8669487e327e8d37b8ff3aed3ab7689">&#9670;&nbsp;</a></span>DispatchMessage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_framework_1_1_core_1_1_message_queue.html">Framework.Core.MessageQueue</a>&lt; TEventType &gt;.DispatchMessage </td>
          <td>(</td>
          <td class="paramtype">TEventType&#160;</td>
          <td class="paramname"><em>msgId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">object&#160;</td>
          <td class="paramname"><em>sender</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">EventArgs&#160;</td>
          <td class="paramname"><em>param</em> = <code>null</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>向所有注册的处理方法分发指定消息。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">msgId</td><td>消息ID</td></tr>
    <tr><td class="paramname">sender</td><td>消息发送者</td></tr>
    <tr><td class="paramname">param</td><td>消息参数</td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="_message_queue_8cs_source.html">MessageQueue.cs</a> 第 <a class="el" href="_message_queue_8cs_source.html#l00079">79</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="class_framework_1_1_core_1_1_message_queue_ab8669487e327e8d37b8ff3aed3ab7689_icgraph.png" border="0" usemap="#class_framework_1_1_core_1_1_message_queue_ab8669487e327e8d37b8ff3aed3ab7689_icgraph" alt=""/></div>
<map name="class_framework_1_1_core_1_1_message_queue_ab8669487e327e8d37b8ff3aed3ab7689_icgraph" id="class_framework_1_1_core_1_1_message_queue_ab8669487e327e8d37b8ff3aed3ab7689_icgraph">
<area shape="rect" id="node2" href="class_app_1_1_procedure_1_1_login_procedure.html#a3b02c8a4600ecb96b915ffed8f3852b9" title="登录的回调 " alt="" coords="269,5,476,47"/>
<area shape="rect" id="node3" href="class_app_1_1_u_i_1_1_login_u_i.html#af56f4646537eaea9bb617e49de042e8d" title="当按下登录按钮时。 " alt="" coords="278,71,467,98"/>
</map>
</div>

</div>
</div>
<a id="a2bcb8c1a195bbb8b375b8caa803244cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2bcb8c1a195bbb8b375b8caa803244cc">&#9670;&nbsp;</a></span>Dispose()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_framework_1_1_core_1_1_message_queue.html">Framework.Core.MessageQueue</a>&lt; TEventType &gt;.Dispose </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>释放消息管理器的资源。 </p>

<p>实现了 <a class="el" href="interface_framework_1_1_core_1_1_i_message_queue.html#a2b6420f5152f7e2b6323af6603771b81">Framework.Core.IMessageQueue</a>.</p>

<p class="definition">在文件 <a class="el" href="_message_queue_8cs_source.html">MessageQueue.cs</a> 第 <a class="el" href="_message_queue_8cs_source.html#l00137">137</a> 行定义.</p>

</div>
</div>
<a id="a021a5bf68a0fa77e6edcfc1a27511b49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a021a5bf68a0fa77e6edcfc1a27511b49">&#9670;&nbsp;</a></span>Initialize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_framework_1_1_core_1_1_message_queue.html">Framework.Core.MessageQueue</a>&lt; TEventType &gt;.Initialize </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>immediate</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>初始化消息管理器。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">immediate</td><td>接受到消息时立即执行，不进入队列。若为false，则消息在下一帧开始逐个执行。</td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">ArgumentException</td><td>类型参数不是枚举类型。</td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="interface_framework_1_1_core_1_1_i_message_queue.html#a0805dc5db0ea7b713e71be27b08e77ef">Framework.Core.IMessageQueue</a>.</p>

<p class="definition">在文件 <a class="el" href="_message_queue_8cs_source.html">MessageQueue.cs</a> 第 <a class="el" href="_message_queue_8cs_source.html#l00109">109</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="class_framework_1_1_core_1_1_message_queue_a021a5bf68a0fa77e6edcfc1a27511b49_icgraph.png" border="0" usemap="#class_framework_1_1_core_1_1_message_queue_a021a5bf68a0fa77e6edcfc1a27511b49_icgraph" alt=""/></div>
<map name="class_framework_1_1_core_1_1_message_queue_a021a5bf68a0fa77e6edcfc1a27511b49_icgraph" id="class_framework_1_1_core_1_1_message_queue_a021a5bf68a0fa77e6edcfc1a27511b49_icgraph">
<area shape="rect" id="node2" href="class_framework_1_1_core_1_1_message_manager.html#adf129f27dd00c22a64ad8c1ec361d11d" title="获得一个消息队列。 " alt="" coords="269,5,497,47"/>
</map>
</div>

</div>
</div>
<a id="a9c56bdfdc642548fed0d9fcac7a81825"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c56bdfdc642548fed0d9fcac7a81825">&#9670;&nbsp;</a></span>RegisterHandler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_framework_1_1_core_1_1_message_queue.html">Framework.Core.MessageQueue</a>&lt; TEventType &gt;.RegisterHandler </td>
          <td>(</td>
          <td class="paramtype">TEventType&#160;</td>
          <td class="paramname"><em>msgId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">EventHandler&lt; EventArgs &gt;&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>注册一个消息处理方法。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">msgId</td><td>消息ID</td></tr>
    <tr><td class="paramname">callback</td><td>接受到消息的回调</td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="_message_queue_8cs_source.html">MessageQueue.cs</a> 第 <a class="el" href="_message_queue_8cs_source.html#l00030">30</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="class_framework_1_1_core_1_1_message_queue_a9c56bdfdc642548fed0d9fcac7a81825_icgraph.png" border="0" usemap="#class_framework_1_1_core_1_1_message_queue_a9c56bdfdc642548fed0d9fcac7a81825_icgraph" alt=""/></div>
<map name="class_framework_1_1_core_1_1_message_queue_a9c56bdfdc642548fed0d9fcac7a81825_icgraph" id="class_framework_1_1_core_1_1_message_queue_a9c56bdfdc642548fed0d9fcac7a81825_icgraph">
<area shape="rect" id="node2" href="class_app_1_1_procedure_1_1_login_procedure.html#a638ca2c907598f7209291855b23779f8" title="当进入该流程时执行。 " alt="" coords="269,5,476,47"/>
<area shape="rect" id="node3" href="class_app_1_1_u_i_1_1_login_u_i.html#a97e896416a7b66bec224c495da34d9e7" title="当注册消息处理方法时执行。 " alt="" coords="284,71,461,112"/>
</map>
</div>

</div>
</div>
<a id="a60596d35a1ec6fdbf05f213b5ec57ac8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60596d35a1ec6fdbf05f213b5ec57ac8">&#9670;&nbsp;</a></span>RemoveHandler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_framework_1_1_core_1_1_message_queue.html">Framework.Core.MessageQueue</a>&lt; TEventType &gt;.RemoveHandler </td>
          <td>(</td>
          <td class="paramtype">TEventType&#160;</td>
          <td class="paramname"><em>msgId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">EventHandler&lt; EventArgs &gt;&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>移除指定消息处理方法。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">msgId</td><td>消息ID</td></tr>
    <tr><td class="paramname">callback</td><td>添加时的回调</td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="_message_queue_8cs_source.html">MessageQueue.cs</a> 第 <a class="el" href="_message_queue_8cs_source.html#l00054">54</a> 行定义.</p>

</div>
</div>
<a id="a8befe645436f030dbf2028fe43af1249"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8befe645436f030dbf2028fe43af1249">&#9670;&nbsp;</a></span>Update()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_framework_1_1_core_1_1_message_queue.html">Framework.Core.MessageQueue</a>&lt; TEventType &gt;.Update </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>推动消息队列。 </p>

<p>实现了 <a class="el" href="interface_framework_1_1_core_1_1_i_message_queue.html#afe34ba79ccac420ba63670fd7a685139">Framework.Core.IMessageQueue</a>.</p>

<p class="definition">在文件 <a class="el" href="_message_queue_8cs_source.html">MessageQueue.cs</a> 第 <a class="el" href="_message_queue_8cs_source.html#l00125">125</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>Assets/Scripts/Core/<a class="el" href="_message_queue_8cs_source.html">MessageQueue.cs</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_framework.html">Framework</a></li><li class="navelem"><a class="el" href="namespace_framework_1_1_core.html">Core</a></li><li class="navelem"><a class="el" href="class_framework_1_1_core_1_1_message_queue.html">MessageQueue</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
